﻿using System.Windows.Forms;

namespace CG5_KT.Forms
{
    public partial class OpaquePanel : UserControl
    {
        public OpaquePanel()
        {
            this.InitializeComponent();

            // As mentioned in Practical Tips For Boosting The Performance Of Windows Forms Apps:
            // http://msdn.microsoft.com/en-us/magazine/cc163630.aspx#S6
            // Opaque control style may help performance by skipping over painting logic that is not being used.
            // Control's function OnPaintBackground is skipped, as it is assumed that the OnPaint function will
            // perform all the painting work (including painting the background).
            this.SetStyle(ControlStyles.Opaque, true);
        }
    }
}
